<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib tagdir="/WEB-INF/tags/" prefix="ag"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<!-- Variables de redirections struts -->
<ag:urls />

<!-- Css -->
<link href="<s:url value="/assets/css/bootstrap.css"/>" rel="stylesheet"
	type="text/css">
<link href="<s:url value="/assets/css/style.css"/>" rel="stylesheet"
	type="text/css">
<link href="<s:url value="/assets/font-awesome/css/font-awesome.css"/>"
	rel="stylesheet" type="text/css">
<link href="<s:url value="/assets/css/style-responsive.css"/>"
	rel="stylesheet" type="text/css">
<link href="<s:url value="/assets/css/dev/tdb.css"/>" rel="stylesheet"
	type="text/css">

<!-- JS propre à la page -->
<script src="<s:url value="/assets/js/jquery.js"/>"></script>
<script src="<s:url value="/assets/js/agraf/visualiser/tdb.js"/>"></script>

<title>Tableau de bord</title>
</head>
<body>
	<section id="contenair"> <ag:header /> <ag:menu /> </section>

	<section id="main-content"> <section class="wrapper">
	<h3>DashBoard</h3>
	<hr>
	<div class="tab-pane">

		<s:if test="selectUser">
			<div>
				<div>
					<select id="selectNouvelUtilisateur">
						<option value="0">-- Selectionnez un autre utilisateur à visionner --</option>
						<s:iterator value="listeUtilisateur">
							<option value="<s:property value="id" />"><s:property
									value="nom" />
								<s:property value="prenom" /></option>
						</s:iterator>
					</select>
				</div>
			</div>
		</s:if>

		<table id="tabDashBoard">
			<tbody>
				<tr>
					<td><div class="row mt">
							<div class="content-panel">
								<h4>Profil</h4>
								<div id="contentResumeProfil">
									<div>
										<span>Nom : ${utilisateurChoisi.nom}</span>
									</div>
									<div>
										<span>Prenom : ${utilisateurChoisi.prenom}</span>
									</div>
									<div>
										<span>Profil(s) :</span>
										<s:iterator value="utilisateurChoisi.listeProfilDTO">
											<span><s:property value="libelle" /> </span>
										</s:iterator>
									</div>
								</div>

								<h4>Résumé général</h4>
								<div id="contentResumeGeneral">
									<span>${libelleResumeGeneral}</span>
									<div>
										<span>Taux de productivité : ${tauxProductivite} %</span>
										<div id="divProductivite"
											style="width: ${largeurProductTotal}px;">
											<div id="contentTauxProduct" class="${classCssTauxProduct}"
												style="width:${widthTauxProduct}px;"></div>
										</div>
									</div>
								</div>

								<h4>Résumé par périmètre (sur les taches terminées)</h4>
								<div id="contentResumeParPerimetre">
									<div class="accordion">
										<s:iterator value="mapPerimetreTachesTerminees">
											<div class="accordion-section">
												<a class="accordion-section-title"
													href="#accordion-<s:property value="key.id" />"><s:property
														value="key.libelle" /></a>

												<div id="accordion-<s:property value="key.id" />"
													class="accordion-section-content">
													<table
														class="table table-striped table-advance table-hover">
														<thead>
															<tr>
																<th>Libellé</th>
																<th>Charge Initiale</th>
																<th>Consommé</th>
																<th>Productivité</th>
															</tr>
														</thead>
														<tbody>
															<s:iterator value="value">
																<tr>
																	<td class="libelleActivite" colspan="4"><s:property
																			value="key.libelle" /></td>
																</tr>
																<s:iterator value="value">
																	<tr>
																		<td><s:property value="libelle" /></td>
																		<td><s:property value="chargeInit" /></td>
																		<td><s:property value="consommeTotal" /></td>
																		<td><s:property value="tauxProductiviteEstimee" /></td>
																	</tr>
																</s:iterator>
															</s:iterator>
														</tbody>
													</table>
												</div>
											</div>
										</s:iterator>
									</div>
								</div>
							</div>
						</div></td>
				</tr>
				<tr>
					<td><div class="row mt">
							<div class="content-panel">
								<h4>Vos activités attribuées</h4>
								<div class="panel-body text-center">
									<table class="table table-striped table-advance table-hover">
										<thead>
											<tr>
												<th>Libellé</th>
												<th>Charge Initiale</th>
												<th>Consommé</th>
												<th>Reste à faire</th>
												<th>Productivité</th>
											</tr>
										</thead>
										<tbody>
											<s:iterator value="mapActiviteEnCours">
												<tr>
													<td class="libelleActivite" colspan="5"><s:property
															value="key.libelle" /></td>
												</tr>
												<s:iterator value="value">
													<tr>
														<td><s:property value="libelle" /></td>
														<td><s:property value="chargeInit" /></td>
														<td><s:property value="consommeTotal" /></td>
														<td><s:property value="raf" /></td>
														<td><s:property value="tauxProductiviteEstimee" /></td>
													</tr>
												</s:iterator>
											</s:iterator>
										</tbody>
									</table>

								</div>
							</div>
						</div></td>
				</tr>
			</tbody>
		</table>


	</div>
	</section> </section>

	<ag:popupNotification />
	<ag:ajoutJs />
</body>
</html>